<?
    /**
     * PrincipioLab
     *
     * @package    PrincipioLab
     */

    /**
     * PrincipioLab_Validate_Request
     *
     * @package    PrincipioLab\Validate
     */
    class PrincipioLab_Validate_Request extends PrincipioLab_Validate_Base
    {
        protected $field;
        protected $message;

        public function __construct($field, $message)
        {
            $this->field = $field;
            $this->message = $message;
        }


        public function isValid($value)
        {
            return PrincipioLab_Validate_Condition::checkValid(!is_null(Zend_Controller_Front::getInstance()->getRequest()->getParam($this->field)), "Не задан [" . $this->message . "].");
        }


        public function getMessages()
        {
            return array();
        }
    }
?>